<template>
  <!-- 跟跟进历史 -->
  <div style="height:520px;">
    <FilterTable
      ref="table"
      height="440"
      :columns="columns"
      :fetchapi="fetchParams"
      :isSelectColumn="isSelectColumn"
      :params="flterValue"
      :datakey="'records'"
      columnsRef="customerManage_continueManage_failure_infoHistory.copy_01"
      :onColumnsChange="columns => (this.columns = columns)"
    ></FilterTable>
  </div>
</template>
<script>
import { dictionary } from '@/utils/dictMixin';
export default {
  mixins: [dictionary],
  props: {
    value: {
      type: Number,
      required: true
    },
    infoBasic: {
      type: String,
      required: true
    }
  },
  data() {
    return {
      isSelectColumn: false,
      flterValue: {}, //参数
      columns: this.creatHeader(),
      fetchParams: null //ipa 接口
    };
  },
  created() {
    this.init();
  },
  methods: {
    //初始化数据
    init() {
      console.log('行id---->', this.value);
      console.log('是否编辑---->', this.infoBasic);
      //赋值
      // this.initForm.forEach(x => {
      //     x.initialValue = data.row[x.fieldName];
      // });
    },
    //table表头和数据源
    creatHeader() {
      return [
        {
          title: '序号',
          dataIndex: 'index',
          width: 80,
          sorter: true,
          render: props => {
            return <span>{props.row.index + 1}</span>;
          }
        },
        { title: '跟进日期', dataIndex: 'field0', sorter: true },
        { title: '跟进人', dataIndex: 'field1', sorter: true },
        { title: '跟进方式', dataIndex: 'field2', sorter: true },
        { title: '跟进状态', dataIndex: 'field01', sorter: true },
        { title: '客户状态', dataIndex: 'field02', sorter: true },
        { title: '会见人', dataIndex: 'field03', sorter: true },
        { title: '同行人', dataIndex: 'field04', sorter: true },
        { title: '客户关系进度', dataIndex: 'field05', sorter: true },
        { title: '成交机会率', dataIndex: 'field06', sorter: true },
        { title: '预计下次跟进日期', dataIndex: 'field07', sorter: true },
        { title: '输出成果', dataIndex: 'field08', sorter: true },
        { title: '下次目标', dataIndex: 'field09', sorter: true },
        { title: '备注', dataIndex: 'field10', sorter: true }
      ];
    }
  }
};
</script>

<style lang="less" scoped></style>
